import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

data = pd.read_csv('工作簿1.csv')
# 提取特征和目标变量
X = data[['x1', 'x2', 'x3','y']]


# 标准化特征数据
scaler = StandardScaler()
X = scaler.fit_transform(X)
df2 = pd.DataFrame(X)
df2.to_csv('data.csv', index=False)